package com.qtummatrix.dao;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * create by Gongshiyong  2019-12-07 11:26
 */
public interface ProductDao {
    /**
     * 获取贷款产品信息
     *
     * @return
     */
    public List<Map<String, Object>> getProductList(int bankid, String loanName, int seriesid, int state, int pageNo,
                                                    int pageSize);


    /**
     * 获取所有产品的总数
     *
     * @return
     */
    public Integer getProductSize(int bankid, String loanName, int seriesid, int state);

    //获取所有的所属银行
    public List<Map<String, Object>> getAllproductBankName();

    //获取所有的产品系列
    public List<Map<String, Object>> getAllproductSerie();

    //获取所有的产品状态
    public List<Map<String, Object>> getAllproductState();

    //删除产品列表的产品
    public int deleteProduct(int id);

    //修改产品状态
    public int updateProductState(int id, int state);

    //根据条件获取产品信息
    public List<Map<String, Object>> queryProductList(int productBank, String productName, int productSerie,
                                                      int productState);

    //新建产品
    public int addProduct(int bankid, String loanName, int seriesid, String definition, String customer,
                          BigDecimal benefitsDown, BigDecimal benefitsUp, Integer shortestperiod,
                          Integer longestperiod, BigDecimal rateDown, BigDecimal rateUp, String logo);

    //获取产品详细信息
    public List<Map<String, Object>> getProductinfo(int id);

    //修改产品详细信息
    public int updateProductinfo(int id, String definition, String customer);
}
